package com.kaili.basic.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.kaili.basic.pojo.dto.*;
import com.kaili.basic.pojo.entity.WarehousingApplication;
import com.kaili.basic.pojo.entity.WarehousingApplicationExport;

import java.util.List;
import java.util.Map;

/**
 * Created by xxx on 2019-03-07.
 */
public interface WarehousingApplicationService {
    //添加入库申请
    int addWarehousingApplication(WarehousingApplicationAddDto warehousingApplicationAddDto);

    //删除入库申请
    int deleteWarehousingApplication(WarehousingApplication warehousingApplication);

    //删除入库申请
    int deleteWarehousingApplications(BusinessOperationDeleteDto deleteDto);

    //修改入库申请
    int updateWarehousingApplication(WarehousingApplicationUpdateDto warehousingApplicationUpdateDto);

    //条件查询获取入库申请详细信息
    Page<WarehousingApplication> queryWarehousingApplication(Page<WarehousingApplication> page, WarehousingApplicationQueryDto warehousingApplication);

    //id查询获取入库申请详细信息
    WarehousingApplication queryWarehousingApplicationById(Long applyId);

    //确认或者取消
    int updateAffirmOrCancel(WarehousingApplication warehousingApplication);

    //入库操作后修改入库申请信息
    int updateOrderWarehousing(List<BaseInStoreDetailAddDto> detailList, String requestCode);

    //退货操作后修改入库申请信息
    int updateOrderWarehousingReturn(List<WarehousingReturnProductDto> returnProductList, String requestCode);

    //查询当前数据库中的最大ID
    Long getMaxApplyId();

    //查询入库申请总退货数量
    Long getSumReturnQuantity(Long applyId);

    //导出
    List<WarehousingApplicationExport> queryWarehousingApplicationExport(WarehousingApplicationQueryDto warehousingApplicationQueryDto);
}
